import Vue from '../../../node_modules/vue/dist/vue.esm';
import Box from './messageBox';

const VueBox = Vue.extend(Box);
function abc(opt) {
  const vm = new VueBox({
    data() {
      return {
        message: opt.message || '标题名称',
        message_2: opt.message_2 || 2,
        confirm: opt.confirm || '确定',
      };
    },
    methods: {
      fn() {
        this.Bos = opt.Bos;
        this.$abc({
          duration: opt.duration,
          center: true,
          dangerouslyUserHTMLString: true,
          message: opt.message || '<span>你点击了确定</span>',
          type: opt.type,
        });
      },
    },
  });
  vm.$mount();
  document.body.appendChild(vm.$el);
}
export default {
  install(_) {
    /* eslint-disable no-param-reassign */
    _.prototype.$box = abc;
  },
};
